package com.zhangh.summer.admin.support.exception;

import lombok.extern.slf4j.Slf4j;

import java.text.MessageFormat;

/**
 * @description: TODO
 * @author: zhanghui  zhanghlucky@163.com
 * @create: 2021-07-01 23:48
 **/
@Slf4j
public class BizException extends RuntimeException{

    public BizException() {
        super();
    }

    public BizException(String message) {
        super(message);
    }
    public static BizException exception(String message){
        BizException exp= new BizException(message);
        return exp;
    }
    public static BizException exception(String message,Object... arguments){
        message= MessageFormat.format(message, arguments);
        BizException exp= new BizException(message);
        return exp;
    }
}
